import request from "@/utils/request";

// 查询模块列表
export function listApplication(query) {
  return request({
    url: "/application/list",
    method: "get",
    params: query,
  });
}

// 查询模块详细
export function getApplication(id) {
  return request({
    url: "/application/" + id,
    method: "get",
  });
}

// 新增模块
export function addApplication(data) {
  return request({
    url: "/application",
    method: "post",
    data: data,
  });
}

// 修改模块
export function updateApplication(data) {
  return request({
    url: "/application",
    method: "put",
    data: data,
  });
}

// 删除模块
export function delApplication(id) {
  return request({
    url: "/application/" + id,
    method: "delete",
  });
}

// 导出模块
export function exportApplication(query) {
  return request({
    url: "/application/export",
    method: "get",
    params: query,
  });
}

// 查询乡镇列表
export function townShip_list(query) {
  return request({
    url: "/townShip/list",
    method: "get",
    params: query,
  });
}

// 新增乡镇
export function townShip_add(data) {
  return request({
    url: "/townShip",
    method: "post",
    data: data,
  });
}

// 乡镇详情
export function townShip_info(data) {
  return request({
    url: "/townShip/info",
    method: "get",
    params: data,
  });
}

// 乡镇修改
export function townShip_update(data) {
  return request({
    url: "/townShip",
    method: "put",
    data: data,
  });
}

// 删除乡镇
export function townShip_delete(id) {
  return request({
    url: "/townShip/"+id,
    method: "delete",
  });
}